
html[data-theme="dark"]{
  --accent: RGB(255,64,0);
  --bg-tint:        rgba(16, 17, 22, .55);
  --panel:          rgba(32, 33, 39, .75);
  --panel-solid:    #202126;
  --panel-2:        rgba(43, 45, 52, .9);
  --border:         rgba(255,255,255,.10);
  --text:           #e8e9ec;
  --text-dim:       #9aa0a8;
  --hover:          rgba(255,255,255,.08);
  --active:         rgba(255,255,255,.17);
  --shadow:         0 18px 50px rgba(0,0,0,.55);
}

html[data-theme="light"]{
--accent: #232323;
--bg-tint:        rgba(168, 170, 174, .4);
--panel:          rgba(211, 211, 211, .75);
--panel-solid:    #ababad;
--panel-2:        rgba(188, 188, 188, .95);
--border:         rgba(0, 0, 0, .13);
--text:           #131417;
--text-dim:       #3f4349;
--hover:          rgba(0, 0, 0, .14);
--active:         rgba(0, 0, 0, .24);
--shadow:         0 18px 50px rgba(179, 179, 179, .55);

}

*{ margin:0; padding:0; box-sizing:border-box; user-select:none; }

html, body{ height:100%; overflow:hidden; }

body{
  font-family: "Arial", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color:#0b0d12;
  background-size: cover;
  background-position: center;
  transition: background-image .3s ease;
}

button{ font-family:inherit; color:inherit; background:none; border:none; cursor:pointer; }
.hidden{ display:none !important; }

/* ---------- Рабочий стол ---------- */
#desktop{
  position:fixed; inset:0 0 48px 0;
  display:flex; flex-direction:column; flex-wrap:wrap;
  align-content:flex-start; gap:4px;
  padding:14px;
}

.app-icon{
  width:88px; padding:10px 4px 8px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  border-radius:8px; cursor:pointer; color: #f0f0f0;
  text-align:center;
}
.app-icon:hover{ background:var(--hover); outline:1px solid var(--border); }

.app-icon .ic{ display:block; }
.app-icon .ic img{
  width:44px; height:44px; object-fit:contain; border-radius:8px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.app-icon .fallback{
  width:44px; height:44px; border-radius:8px;
  background:var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-weight:600; font-size:20px; color:#fff;
}
.app-icon span{ font-size:12px; line-height:1.25; text-shadow:0 1px 3px rgba(0,0,0,.7); word-break:break-word; }

/* ---------- Панель задач ---------- */
#taskbar{
  position:fixed; left:0; right:0; bottom:0; height:48px; z-index:9000;
  display:flex; align-items:center; padding:0 10px; gap:8px;
  background:var(--panel);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-top:1px solid var(--border);
}

#startbtn{
  width:40px; height:40px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  transition: background .15s;
}
#startbtn:hover, #startbtn.open{ background:var(--hover); }
.logo{ display:grid; grid-template-columns:repeat(2, 10px); gap:5px; }
.logo span{
  width:10px; height:10px; border-radius:2px;
  background:var(--accent);
}

#taskitems{ flex:1; display:flex; gap:6px; overflow:hidden; }
.task-item{
  height:40px;  padding:0 12px; border-radius:10px;
  display:flex; align-items:center; gap:8px;
  font-size:12.5px; max-width:180px; white-space:nowrap;
  transition: background .25s;
  border-bottom:1px solid rgba(255,255,255,0.0);
}

 .task-item.running:hover{background:var(--active);}
.task-item img, .task-item .fb{
  width:26px; height:26px; object-fit:contain;  flex:none;
}
.task-item .fb{ background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600;  }
.task-item span{ overflow:hidden; text-overflow:ellipsis; }
.task-item:hover{ background:var(--hover); }
.task-item.active{ background:var(--active); border-bottom: 1px solid var(--accent); }

#tray{ display:flex; align-items:center; }
#clock{
  font-size:12px; text-align:center; line-height:1.3;
  padding:6px 10px; border-radius:6px; cursor:default;
}
#clock:hover{ background:var(--hover); }

/* ---------- Стартовое меню ---------- */
#startmenu{
  position:fixed; bottom:58px; left:50%; transform:translateX(-50%);
  width:520px; max-width:calc(100vw - 24px); max-height:70vh;
  z-index:9500; padding:24px 26px 0;
  background:var(--panel);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border:1px solid var(--border); border-radius:12px;
  box-shadow:var(--shadow);
  display:flex; flex-direction:column;
  animation: smIn .27s ease;
}
@keyframes smIn{ from{ opacity:0; transform:translateX(-50%) translateY(12px);} to{ opacity:1; transform:translateX(-50%) translateY(0); } }

.sm-search input{
  width:100%; height:36px; padding:0 14px;
  border:1px solid var(--border); border-bottom-color:var(--accent);
  border-radius:18px; outline:none;
  background: color-mix(in srgb, var(--panel-2) 83%, transparent); color:var(--text); font-size:13px;
}
.sm-label{ margin:18px 0 10px; font-size:13px; font-weight:600; }

.sm-grid{
  overflow-y:auto; min-height:120px;
  display:grid; grid-template-columns:repeat(6, 1fr); gap:4px;
  padding-bottom:14px;
}
.sm-app{
  padding:10px 4px; border-radius:8px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:7px;
  text-align:center;
}
.sm-app:hover{ background:var(--hover); }
.sm-app img, .sm-app .fallback{
  width:38px; height:38px; object-fit:contain; border-radius:8px;
}
.sm-app .fallback{ background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:17px; }
.sm-app span{ font-size:11.5px; line-height:1.25; word-break:break-word; }
.sm-empty{ grid-column:1/-1; padding:26px 0; text-align:center; color:var(--text-dim); font-size:12.5px; }

.sm-footer{
  margin:0 -26px; padding:12px 26px;
  display:flex; align-items:center; justify-content:space-between;
  border-top:1px solid var(--border);
  background:color-mix(in srgb, var(--panel-2) 83%, transparent);
  border-radius:0 0 12px 12px;
}
.sm-user{ display:flex; align-items:center; gap:10px; font-size:13px; }
.sm-avatar{
  width:30px; height:30px; border-radius:50%;
  background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:600;
}
#sm-power{ width:34px; height:34px; border-radius:8px; font-size:15px; }
#sm-power:hover{ background:var(--hover); }
.hc-tray-item { margin-right: 3px}

.window{
  position:fixed; min-width:320px; min-height:200px;
  background:var(--panel-solid);
  border:1px solid var(--border); border-radius:10px;
  box-shadow:var(--shadow);
  display:flex; flex-direction:column; overflow:hidden;
  animation: winIn .34s ease;
}
.window:hover{border-color:rgba(255,255,255,.18);}

@keyframes winIn{ from{ opacity:0; transform:scale(.81); } to{ opacity:1; transform:scale(1); } }
.window.maximized{ border-radius:0; border: 0px solid rgba(0,0,0,0.0)}
.window:focus-within{ border-color:rgba(255,255,255,.22); }

.win-header{
  height:38px; flex:none;
  display:flex; align-items:center; gap:9px; padding-left:12px;
  background:var(--panel-2);
  border-bottom:1px solid var(--border);
  cursor:default;
}
.win-header img, .win-header .fb{ width:18px; height:18px;  object-fit:contain; }
.win-header .fb{ background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:600; }
.win-title{ flex:1; font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.win-btns{ display:flex; height:100%; }
.win-btns button{ width:46px; height:100%; font-size:11px; display:flex; align-items:center; justify-content:center; }
.win-btns button:hover{ background:var(--hover); }
.win-btns .close:hover{ background:#e81123; color:#fff; }

.win-body{ flex:1; position:relative; background:#fff; }
html[data-theme="dark"] .win-body{ background:#1c1d22; }
.win-body iframe{ position:absolute; inset:0; width:100%; height:100%; border:none; }
.win-body.builtin{ padding:20px 24px; overflow-y:auto; user-select:text; }

.win-resize{
  position:absolute; right:0; bottom:0; width:16px; height:16px;
  cursor:nwse-resize; z-index:5;
}


.st-title{ font-size:19px; font-weight:600; margin-bottom:4px; }
.st-sub{ font-size:12.5px; color:var(--text-dim); margin-bottom:18px; }
.st-section{ margin-bottom:22px; }
.st-section h3{ font-size:13.5px; margin-bottom:10px; font-weight:600; }
.st-row{ display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.st-hint{ font-size:11.5px; color:var(--text-dim); margin-top:6px; }

.seg{ display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.seg button{ padding:7px 16px; font-size:12.5px; }
.seg button.on{ background:var(--accent); color:#fff; }

.swatch{
  width:30px; height:30px; border-radius:8px; cursor:pointer;
  outline:2px solid transparent; outline-offset:2px;
}
.swatch.on{ outline-color:var(--text); }

input[type=color]{
  width:44px; height:30px; border:1px solid var(--border); border-radius:6px;
  background:none; padding:2px; cursor:pointer;
}
input[type=range]{ accent-color:var(--accent); width:160px; }

.wp-thumb{
  width:120px; height:68px; border-radius:8px; cursor:pointer;
  background-size:cover; background-position:center;
  outline:2px solid transparent; outline-offset:2px;
  border:1px solid var(--border);
}
.wp-thumb.on{ outline-color:var(--accent); }
.wp-missing{
  width:120px; height:68px; border-radius:8px; cursor:pointer;
  border:1px dashed var(--border);
  display:flex; align-items:center; justify-content:center;
  font-size:10.5px; color:var(--text-dim); text-align:center; padding:6px;
}
.wp-missing.on{ outline:2px solid var(--accent); outline-offset:2px; }

.st-check{ display:flex; align-items:center; gap:9px; font-size:13px; margin-bottom:10px; cursor:pointer; }
.st-check input{ width:16px; height:16px; accent-color:var(--accent); cursor:pointer; }

.st-btn{
  padding:8px 18px; border-radius:8px; font-size:12.5px;
  background:color-mix(in srgb, var(--panel-2) 83%, transparent); border:1px solid var(--border);
}
.st-btn:hover{ background:var(--hover); }
.st-btn.accent{ background:var(--accent); border-color:transparent; color:#fff; }
.st-btn.accent:hover{ filter:brightness(1.1); }


::-webkit-scrollbar{ width:6px; height:10px; }
::-webkit-scrollbar-thumb{ background:var(--hover); border-radius:5px; }
::-webkit-scrollbar-thumb:hover{ background:var(--active); }


.app-icon .ic img{ width:44px; height:44px; object-fit:contain; border-radius:4px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
